{extend name="blog@public/basic" /}

{block name="style"}
<link rel="stylesheet" type="text/css" href="__STATIC__/css/blog/login.css"/>
<style>
    .seraph {
        font-size: 25px;
        text-align: center;
    }

    .seraph.icon-qq:hover {
        color: #0288d1;
    }

    .seraph.icon-wechat:hover {
        color: #00d20d;
    }

    .seraph.icon-sina:hover {
        color: #d32f2f;
    }
</style>
{/block}

{block name="cotent"}

<div class="reg_main">
    <div class="reg_top">会员登录</div>
    <div class="reg_box">
        <form>
            <div class="main_left">
                <div class="item_box">
                    <div class="type">登录账户:</div>
                    <div class="value"><input type="text" name="username" id="username" class="txt"/></div>
                </div>

                <div class="item_box">
                    <div class="type">登录密码:</div>
                    <div class="value"><input type="password" name="password" id="password" class="txt"/></div>
                </div>

                <div class="item_box">
                    <div class="type">验证码:</div>
                    <div class="value"><input type="text" name="vercode" id="vercode" class="code" size="4" value=""/> &nbsp;<a href="javascript:;"> <img src='{:captcha_src()}' onclick="this.src='{:captcha_src()}?seed='+Math.random()"/></a></div>
                </div>
                <div class="item_box">
                    <div class="type"></div>
                    <div class="value"><input type="submit" id="loginBt" class="bt" value="   &nbsp;&nbsp;立即登录 &nbsp; &nbsp; "/></div>
                </div>

                <div class="item_box">
                    <div class="type">快捷登录</div>
                    <div class="value"><a data-href="{:url('@blog/oauth/index')}"><img src="__STATIC__/image/blog/Connect_logo_3.png"></a></div>
                    <!--<div>-->
                    <!--<a href="javascript:;" id="loginQQ" class="seraph icon-qq layui-col-xs2 layui-col-sm2 layui-col-md2 layui-col-lg2"></a>-->
                    <!--<a href="javascript:;" class="seraph icon-wechat layui-col-xs2 layui-col-sm2 layui-col-md2 layui-col-lg2"></a>-->
                    <!--<a href="javascript:;" class="seraph icon-sina layui-col-xs2 layui-col-sm2 layui-col-md2 layui-col-lg2"></a>-->
                    <!--</div>-->
                </div>

            </div>
        </form>
        <div class="main_right">
            <div class="tips">我们诚挚的邀请您加入<br/>久久PHP社区！</div>
            <div class="box">
                还没有账户：<a data-href="{:url('@blog/login/register')}">马上注册</a><br/><br/>
            </div>
        </div>
    </div>
</div>
{/block}

{block name="script"}
<script>
    /**
     * 会员登录
     */
    $("#loginBt").click(function () {
        var data = {username: $("#username").val(), password: $("#password").val(), vercode: $("#vercode").val()}
        $.request.post("{:url('@blog/login')}", data, function (res) {
            $.msg.success(res.msg, function () {
                window.location.href = "{:url('@blog')}";
            });
        });
        return false;
    });
</script>
{/block}